package com.ivanceras.client.widgets;

import com.google.gwt.core.client.GWT;
import com.google.gwt.uibinder.client.UiBinder;
import com.google.gwt.uibinder.client.UiField;
import com.google.gwt.user.client.ui.Composite;
import com.google.gwt.user.client.ui.HTML;
import com.google.gwt.user.client.ui.HTMLPanel;
import com.google.gwt.user.client.ui.Widget;

public class MainPanelUi extends Composite {

	private static MainPanelUiUiBinder uiBinder = GWT
			.create(MainPanelUiUiBinder.class);

	interface MainPanelUiUiBinder extends UiBinder<Widget, MainPanelUi> {
	}

	private static MainPanelUi singleton;
	
	@UiField HTMLPanel menuPanel;
	@UiField HTMLPanel windowName;
	@UiField HTMLPanel windowPanel;

	
	public MainPanelUi() {
		initWidget(uiBinder.createAndBindUi(this));
		singleton = this;
	}
	
	public static MainPanelUi get(){
		return singleton;
	}
	
	public void addWindow(String window, AdWindowUi windowUi){
		windowName.add(new HTML(window));
		windowPanel.add(windowUi);
		
	}
	public void addMenu(AdMenuUi menuUi){
		menuPanel.add(menuUi);
	}

}
